package com.example.zhangpeng.spannabletest;

import android.text.style.ClickableSpan;
import android.view.View;

/**
 * Created by zhangpeng on 2016/3/21.
 */
public class IntentSpan extends ClickableSpan {
    private final View.OnClickListener listener;

    public IntentSpan(View.OnClickListener listener) {
        this.listener = listener;
    }


    @Override
    public void onClick(View widget) {
        listener.onClick(widget);
    }
}
